#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
  // goto语句
  int score = -1;
  int sum = 0;
  int i = 0;
next:
  printf("请输入第%d个同学的成绩：", i + 1);
  scanf("%d", &score);
  if (score >= 0 && score <= 100) {
    sum += score;
    i++;
    goto next;
  }
  if (i != 0) {
    printf("%d个学生的平均成绩是：%d\n", i, sum / i);
  }
  return EXIT_SUCCESS;
}
